package iut.acy.iutevents;

import android.os.Bundle;
import android.content.Intent;
import android.content.res.Resources;
import android.widget.TabHost;
import android.app.TabActivity;


@SuppressWarnings("deprecation")
public class MainActivity extends TabActivity 
{
	@Override
	protected void onCreate(Bundle savedInstanceState) 
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		Resources res = getResources(); 
		TabHost tabHost = getTabHost();
		TabHost.TabSpec spec; 
		Intent intent; 

		intent = new Intent().setClass(this, Tab1_All_Events.class);
		spec = tabHost
				.newTabSpec("Evenement")
				.setIndicator("Evenement",
						res.getDrawable(android.R.drawable.ic_menu_today))
				.setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent().setClass(this, Tab2_Search_Events.class);
		spec = tabHost
				.newTabSpec("Recherche")
				.setIndicator("Recherche",
						res.getDrawable(android.R.drawable.ic_menu_manage))
				.setContent(intent);
		tabHost.addTab(spec);

		intent = new Intent().setClass(this, Tab3_Admin_Area.class);
		spec = tabHost
				.newTabSpec("Espace Admin")
				.setIndicator("Espace Admin", res.getDrawable(android.R.drawable.ic_menu_mapmode))
				.setContent(intent);
		tabHost.addTab(spec);

		tabHost.setCurrentTab(0);
	}
/*
	@Override
	public boolean onCreateOptionsMenu(Menu menu) 
	{
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_main, menu);
		return true;
	}
*/

}
